package com.app.designpattern.structural.proxy1;

import android.util.Log;

/**
 * USER: zjw
 * DATA: 2019/4/25 0025
 * TIME: 上午 11:28
 */
public class CarTimeProxy implements Moveable {
    private Moveable moveable;

    public CarTimeProxy(Moveable moveable) {
        this.moveable = moveable;
    }

    @Override
    public void run() {
        doBeforSomthing();
        moveable.run();
        doAfterSomthing();
    }

    private void doAfterSomthing() {
        Log.i("proxy1","汽车行使结束..");
    }

    private void doBeforSomthing() {
        Log.i("proxy1","汽车开始行使..");
    }
}
